package com.xinyun.traceability.constants;

public enum ResponseState {

    SUCCESS("2000", "成功", true),
    FAILURE("2001", "失败", false),
    CONFIRM("2002", "需要用户确认", false),
    NULL_RESULT("2003", "查询结果为空", false),
    BAD_PARAM("2004", "查询参数为空或者未能查询到有效值", false),
    ERROR("500", "服务器内部错误", false),
    ERROR_DEFAULT("5000", "服务器运行时错误", false),
    ERROR_REQUIREDPARAMS("5001", "缺少必要参数", false),
    ERROR_BADPARAMS("5002", "参数格式错误", false);


    private String code;
    private String message;
    private boolean success;

    ResponseState(String code, String message, boolean success) {
        this.code = code;
        this.message = message;
        this.success = success;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public boolean isSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }
}
